package EX.Arraycopy;

public class ex {
        public static void main(String[] args) {
            int[] x = {1, 2, 3, 4, 5};
//        int[] y = new int[4];
//        System.arraycopy(x,0,y,0,4);
//
//        for(int a : y){
//            System.out.print(a+",");
//        }
            double[] y = new double[3];
            System.arraycopy(x, 0, y, 0, 3);
            for (double a : y) {
                System.out.print(a + ",");
            }
        }
}
